package com.zb.mobile;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zb.vo.OrderGoodsTypeVo;
import com.zb.vo.OrderImageVo;
import com.zb.vo.OrderUserVo;
import com.zb.vo.WorkFieldValVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/11/9 0009
 **/
@Data
@ApiModel("客户报单对象")
public class UserOrderVo {
    @ApiModelProperty(value = "是否历史工单报单：false-否，true-是", example = "false")
    private boolean historyOrder = Boolean.FALSE;

    @ApiModelProperty(value = "质保状态：false-保内，true-保外；historyOrder为true时，此字段才生效")
    private Boolean overinsured = Boolean.FALSE;

    @ApiModelProperty(value = "品牌商家ID")
    private Long factoryId;

    @NotNull(message = "工单模块ID能为空")
    @ApiModelProperty(value = "工单模块ID", required = true)
    private Long moduleId;

    @ApiModelProperty(value = "收取客户费用")
    private BigDecimal collectCustomerPrice;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "期望上门日期")
    private Date expectedDate;

    @JsonFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "期望开始上门时间")
    private Date expectedStartTime;

    @JsonFormat(pattern = "HH:mm")
    @ApiModelProperty(value = "期望开始上门时间")
    private Date expectedEndTime;

    @Length(max = 1000, message = "备注说明长度限制 1000 个字符以内")
    @ApiModelProperty(value = "备注说明")
    private String content;

    @ApiModelProperty(value = "收取客户费用凭证")
    private String collectCustomerPriceVoucher;

    @ApiModelProperty(value = "工单附件对象")
    private List<OrderImageVo> images;

    @Valid
    @ApiModelProperty(value = "工单客户对象")
    private OrderUserVo orderUser;

    @Valid
    @ApiModelProperty(value = "工单商品类型对象")
    private List<OrderGoodsTypeVo> orderGoodsTypes;

    @Valid
    @ApiModelProperty(value = "工单自定义字段值对象")
    private List<WorkFieldValVo> workFieldVal;
}
